<?php
/*
 * @Description: 
 */
namespace app\controller;
use app\BaseController;

class Error extends BaseController
{
  public function __call(string $method, array $args)
  {
    return "当前控制器不存在！";
    // return json(['code' => 404, 'msg' => 'Method not found: ' . $method]);
  }
    
    public function index()
    { 
        // 返回错误信息
        return json(['code' => 500, 'msg' => 'Internal Server Error']);
    }

    public function notFound()
    {
        // 返回404错误信息
        return json(['code' => 404, 'msg' => 'Resource Not Found']);
    }
}